﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using yncTech.BusinessObjects;

namespace yncTech.BusinessComponent
{
    public class SystemBC
    {
        public SystemBC()
        {
        }

        public TSUsers GetUsersByLoginName(string loginName)
        {
            TSUsers user = new TSUsers();
            user.Query.Where(user.Query.LoginName == loginName);
            user.Query.Load();
            return user;

        }

        /// <summary>
        /// 检查所输入的用户名是否存在
        /// </summary>
        /// <param name="loginName"></param>
        /// <returns>true:存在 false:不存在</returns>
        public bool CheckLoginNameExists(string loginName)
        {
            TSUsers user = new TSUsers();
            user.Query.Where(user.Query.LoginName == loginName);
            user.Query.Load();
            return user.es.HasData;
        }

        
    }
}
